<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
  <div class="row">
    <div class="col-md-12">
      <h1>选择Excel文件导入到数据中</h1>
      <form th:action="@{/user/import}" method="post" enctype="multipart/form-data" class="form-inline">
        <div class="form-group">
          <input class="form-control" type="file" name="excelFile">
          <input type="submit" class="btn btn-danger" value="导入数据">
        </div>
      </form>
    </div>
    <div class="col-md-12">
      <h1>显示导入数据列表</h1>
      <table class="table table-bordered">
        <tr>
          <th>编号</th>
          <th>头像</th>
          <th>姓名</th>
          <th>爱好</th>
          <th>生日</th>
          <th>身份证号</th>
          <th>住址</th>
        </tr>
        <tr th:each="user : ${users}">
          <td th:text="${user.id}"></td>
          <!--<td><img src="" alt=""></td>-->
          <td th:text="${user.name}"> </td>
          <td th:text="${user.habbys}"> </td>
          <td th:text="${#dates.format(user.bir,'yyyy-MM-dd')}"></td>
          <td th:text="${user.no}"></td>
          <td th:text="${user.address}"></td>
        </tr>

      </table>
      <hr>
      <a th:href="@{/user/export}" class="btn btn-info" >导出excel</a>
      <a th:href="@{/user/export/api}" class="btn btn-info" >导出CALL_API_excel</a>
    </div>
  </div>
</div>
</body>
</html>
